#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#define stdinfd 	0
#define stdoutfd 	1

ssize_t my_read(int,void*,size_t);
ssize_t my_write(int,const void*,size_t);
void *mymalloc(size_t);
void myfree(void *);
void *myrealloc(void *, size_t);
void *mymemcpy(void *dest, void *src, size_t n);


/*
*	Lee un caracter desde stdin y lo escribe por stdout
*	hasta llegar al EOF
*
*/
int main(int argc,char **argv)
{

	char* c;
	char* d;
	c = (char*)mymalloc(sizeof(char)*20);
	d = (char*)mymalloc(sizeof(char)*20);
	mymemcpy(c,"1234567890\n\0",12);
	mymemcpy(d,"123456789012345\n\0",17);
	c = myrealloc(c,sizeof(char)*50);
	d = myrealloc(d,sizeof(char)*70);
	my_write(stdoutfd,c,12);
	my_write(stdoutfd,d,17);
	myfree(c);
	myfree(d);
	return 0;
}
